# coding:utf-8
import redis
from .bloomfilter import BloomFilter

from src import settings

bloom_filter = BloomFilter()


def isExistFactory(isExist):
    def f(url):
        return bloom_filter.isContains(url)

    return f


def insertFactory(insert):
    def f(url):
        bloom_filter.insert(url)

    return f


@isExistFactory
def isExist(url):
    # for extends in future
    pass


@insertFactory
def insert(url):
    # for extends in future
    pass


def deal(url):
    pass
